package generatedtest;

import java.io.InputStream;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.MultipartRequest;
import org.springframework.web.multipart.MultipartResolver;

// Test case generated by GenerateFlowTestCase.ql
public class Test {

	Object getElement(Iterator container) { return container.next(); }
	Object getElement(Collection container) { return container.iterator().next(); }
	Object getMapValue(Map container) { return container.get(null); }
	Object source() { return null; }
	void sink(Object o) { }

	public void test() throws Exception {

		{
			// "org.springframework.web.multipart;MultipartFile;true;getBytes;;;Argument[this];ReturnValue;taint;manual"
			byte[] out = null;
			MultipartFile in = (MultipartFile)source();
			out = in.getBytes();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartFile;true;getInputStream;;;Argument[this];ReturnValue;taint;manual"
			InputStream out = null;
			MultipartFile in = (MultipartFile)source();
			out = in.getInputStream();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartFile;true;getName;;;Argument[this];ReturnValue;taint;manual"
			String out = null;
			MultipartFile in = (MultipartFile)source();
			out = in.getName();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartFile;true;getOriginalFilename;;;Argument[this];ReturnValue;taint;manual"
			String out = null;
			MultipartFile in = (MultipartFile)source();
			out = in.getOriginalFilename();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartFile;true;getResource;;;Argument[this];ReturnValue;taint;manual"
			Resource out = null;
			MultipartFile in = (MultipartFile)source();
			out = in.getResource();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartHttpServletRequest;true;getMultipartHeaders;;;Argument[this];ReturnValue;taint;manual"
			HttpHeaders out = null;
			MultipartHttpServletRequest in = (MultipartHttpServletRequest)source();
			out = in.getMultipartHeaders(null);
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartHttpServletRequest;true;getRequestHeaders;;;Argument[this];ReturnValue;taint;manual"
			HttpHeaders out = null;
			MultipartHttpServletRequest in = (MultipartHttpServletRequest)source();
			out = in.getRequestHeaders();
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartRequest;true;getFile;;;Argument[this];ReturnValue;taint;manual"
			MultipartFile out = null;
			MultipartRequest in = (MultipartRequest)source();
			out = in.getFile(null);
			sink(out); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartRequest;true;getFileMap;;;Argument[this];MapValue of ReturnValue;taint;manual"
			Map out = null;
			MultipartRequest in = (MultipartRequest)source();
			out = in.getFileMap();
			sink(getMapValue(out)); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartRequest;true;getFileNames;;;Argument[this];Element of ReturnValue;taint;manual"
			Iterator out = null;
			MultipartRequest in = (MultipartRequest)source();
			out = in.getFileNames();
			sink(getElement(out)); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartRequest;true;getFiles;;;Argument[this];Element of ReturnValue;taint;manual"
			List out = null;
			MultipartRequest in = (MultipartRequest)source();
			out = in.getFiles(null);
			sink(getElement(out)); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartRequest;true;getMultiFileMap;;;Argument[this];MapValue of ReturnValue;taint;manual"
			MultiValueMap out = null;
			MultipartRequest in = (MultipartRequest)source();
			out = in.getMultiFileMap();
			sink(getMapValue(out)); // $hasTaintFlow
		}
		{
			// "org.springframework.web.multipart;MultipartResolver;true;resolveMultipart;;;Argument[0];ReturnValue;taint;manual"
			MultipartHttpServletRequest out = null;
			HttpServletRequest in = (HttpServletRequest)source();
			MultipartResolver instance = null;
			out = instance.resolveMultipart(in);
			sink(out); // $hasTaintFlow
		}

	}

}
